package com.eastcom.providor.service.impl;

import java.util.List;

import com.eastcom.bm.atom.Atom_DatasetNe;
import com.eastcom.providor.dao.IDataSetNeDao;
import com.eastcom.providor.service.BaseService;
import com.eastcom.providor.service.IDataSetNeService;

public class DataSetNeService extends BaseService implements IDataSetNeService {

	private IDataSetNeDao dataSetNeDao;
	
	public void setDataSetNeDao(IDataSetNeDao dataSetNeDao) {
		this.dataSetNeDao = dataSetNeDao;
	}
	
	public boolean saveDatasetNes(String dataSetId, List<String> publicNeIds) {
		try{
			dataSetNeDao.saveDatasetNes(dataSetId, publicNeIds);
			return true;
		}
		catch(Exception e){
			log.error("IDataSetNeService saveDatasetNes error", e);
		}
		return false;
	}

	public boolean editDatasetNes(String dataSetId, List<String> publicNeIds) {
		try{
			dataSetNeDao.editDatasetNes(dataSetId, publicNeIds);
			return true;
		}
		catch(Exception e){
			log.error("IDataSetNeService editDatasetNes error", e);
		}
		return false;
	}
	
	public List<Atom_DatasetNe> getAllDatasetNe() {
		try{
			return dataSetNeDao.getAllDatasetNe();
		}
		catch(Exception e){
			log.error("IDataSetNeService getAllDatasetDefine error", e);
		}
		
		return null;
	}

}
